package com.example.famhealing.testactivity;

import com.example.famhealing.R;
import com.example.famhealing.R.id;
import com.example.famhealing.R.layout;
import com.example.famhealing.R.menu;
import com.example.famhealing.lockscreen.LockScreenService;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class LockTestActivity extends Activity implements OnClickListener{

	Button start;
	Button end;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lock_test);
		
		start=(Button)findViewById(R.id.ok);
		end=(Button)findViewById(R.id.menubtn);
		
		start.setOnClickListener(this);
		end.setOnClickListener(this);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public void onClick(View view) {
		switch(view.getId())
		{
		case R.id.ok: 
			startService(new Intent(this, LockScreenService.class));
			break;
		case R.id.menubtn:
			stopService(new Intent(this, LockScreenService.class));
			break;
		}
	}

}
